<template>
  <div>
    <el-container>
      <el-main>
        <el-container class="parent-body">
          <el-header class="content-header">
            <div><i class="el-icon-search"></i> 筛选查询</div>
            <div><el-button @click.native="selectResults">查询结果</el-button></div>
          </el-header>
          <el-main class="info-main">
            <el-form ref="form" :model="form" label-width="130px">
              <el-form-item class="select-div" label="起止时间：">
                <el-date-picker class="input-width"
                        v-model="form.name"
                        type="datetime"
                        placeholder="选择日期时间">
                </el-date-picker>
              </el-form-item>
              <el-form-item class="select-div" label="货号：">
                <el-input class="input-width" v-model="form.type"></el-input>
              </el-form-item>
              <el-form-item label="订单时间类型：">
                <el-radio v-model="form.brand" label="1">发货时间</el-radio>
                <el-radio v-model="form.brand" label="2">下单时间   </el-radio>
              </el-form-item>
              <el-form-item label="订单状态：">
                <el-checkbox v-model="form.test01">待付款</el-checkbox>
                <el-checkbox v-model="form.test02">待发货</el-checkbox>
                <el-checkbox v-model="form.test03">已发货</el-checkbox>
                <el-checkbox v-model="form.test04">已完成</el-checkbox>
                <el-checkbox v-model="form.test05">已关闭</el-checkbox>
              </el-form-item>
            </el-form>
          </el-main>
        </el-container>
      </el-main>

      <el-footer>
        <el-container class="parent-body">
          <el-header class="content-header">
            <div><i class="el-icon-s-fold"></i> 数据列表</div>
            <div>
              <el-button>导出数据</el-button>
              <el-select v-model="accordingPageSize" class="input-width2" placeholder="显示条数">

              </el-select>
              <el-select v-model="sort" class="input-width2" placeholder="排列方式">

              </el-select>
            </div>
          </el-header>
          <el-main class="info-main padding-style">
            <el-table ref="multipleTable" @selection-change="handleSelectionChange" :data="tableData" height="100%" border style="width: 100%">
              <el-table-column prop="number" label="订单号" width="180"></el-table-column>
              <el-table-column prop="img" label="商品名称" width="200" ></el-table-column>
              <el-table-column prop="name" label="货号" width="150"> </el-table-column>
              <el-table-column prop="article" label="商品数量"> </el-table-column>
              <el-table-column prop="label" label="订单金额"> </el-table-column>
              <el-table-column prop="sort" label="订单状态"> </el-table-column>
              <el-table-column prop="sale" label="下单时间" width="180"> </el-table-column>
              <el-table-column prop="stater" label="发货时间" width="180"> </el-table-column>
            </el-table>
          </el-main>
          <el-footer class="info-foot">
            <div class="paging-style">
              <el-pagination
                      background
                      @size-change="handleSizeChange"
                      @current-change="handleCurrentChange"
                      :current-page.sync="currentPage1"
                      :page-size="pageSize"
                      layout="total, prev, pager, next, jumper"
                      :total="total">
              </el-pagination>
            </div>
          </el-footer>
        </el-container>
      </el-footer>
    </el-container>

  </div>
</template>

<script scoped>
    export default {
        data() {
            return {
                form:{
                    name:"",
                    type:"",
                    brand:"1",
                    test01:true,
                    test02:false,
                    test03:false,
                    test04:false,
                    test05:false
                },
                accordingPageSize:"",
                sort:"",
                multipleSelection: [],
                moreOperation:"",
                pageSize:10,
                total:2,
                currentPage1:1,
                tableData: [{
                  number: '201807196398345',
                  img:'2018 iphoneXsMax128GB',
                  name: 'No999999',
                  article: '1',
                  label: '¥9599.00',
                  sort: '待付款',
                  sale: '2018-10-01 14:36:21',
                  stater: '2018-10-01 14:36:21'
                },{
                    number: '201807196398345',
                    img:'2018 iphoneXsMax128GB',
                    name: 'No999999',
                    article: '1',
                    label: '¥9599.00',
                    sort: '待付款',
                    sale: '2018-10-01 14:36:21',
                    stater: '2018-10-01 14:36:21'
                },{
                    number: '201807196398345',
                    img:'2018 iphoneXsMax128GB',
                    name: 'No999999',
                    article: '1',
                    label: '¥9599.00',
                    sort: '待付款',
                    sale: '2018-10-01 14:36:21',
                    stater: '2018-10-01 14:36:21'
                },]
            }
        },
        methods:{
            currentRefresh(){
                this.$router.go(0);
            },
            selectResults(){
                alert("执行查询结果")
            },
            handleSelect(index, row) {
               alert("执行查询"+index+","+row);
            },
            handleAudit(index, row) {
                this.goodsAudit.name = row.name;
                this.dialogVisible = true;
            },
            confirm(){
                alert("执行批量操作");
            },
            handleSizeChange(val) {
                alert(`每页 ${val} 条`);
            },
            handleCurrentChange(val) {
                alert(`当前页: ${val}`);
            },
            handleClose(done) {
                done();
            },
            handleSelectionChange(val) {
                this.multipleSelection = val;
                if(val.length == this.tableData.length){
                    this.checkbox = true;
                }else if(val.length != this.tableData.length){
                    this.checkbox = false;
                }
            },
        }
    }
</script>
<style>
  .common-home,.content-header{
    border-bottom:1px solid #E4E4E4;
    position: relative;
  }
  .common-home>div{
    display: inline-block;
    width:100px;
    height:50px;
    vertical-align: top;
    text-align: center;
    line-height: 50px;
    color:#666666;
  }
  .common-home>.refresh{
    position: absolute;
    right:10px;
  }
  .common-home>div>span{
    border:4px solid #0399FE;
    display: inline-block;
    width: 0px;
    height: 15px;
    vertical-align: middle;
    margin-right: 5px;
    background-color: #0399FE;
  }
  .parent-body{
    border:1px solid #E4E4E4;
  }
  .content-header{
    height:50px;
    line-height: 50px;
    background-color:#F3F3F3;
    color:#666666;
    position: relative;
    text-align: left;
  }
  .info-main{
    background-color:#fff;
  }

  .content-header>div{
    display: inline-block;
  }
  .content-header>div:last-of-type{
    position: absolute;
    right:10px;
  }
  .input-width{
    width:200px;
  }
  .select-div{
    display: inline-block;
    width:300px;
  }
  .input-width2{
    width:120px;
  }
  .padding-style{
    padding:0 !important;
  }

  .info-foot{
    background-color:#FDFDFE;
    height:60px;
    line-height: 60px;
    position: relative;
  }
  .paging-style{
    position: absolute;
    right:10px;
    display: inline-block;
    top:15px;
  }
  .margin-left{
    margin-left:10px;
  }
</style>